Optimal. Leaf size=76 \[ \frac {a^2 \tanh (c+d x)}{d}-\frac {b (2 a-b) \tanh ^5(c+d x)}{5 d}-\frac {a (a-2 b) \tanh ^3(c+d x)}{3 d}-\frac {b^2 \tanh ^7(c+d x)}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3675, 373} \[ \frac {a^2 \tanh (c+d x)}{d}-\frac {b (2 a-b) \tanh ^5(c+d x)}{5 d}-\frac {a (a-2 b) \tanh ^3(c+d x)}{3 d}-\frac {b^2 \tanh ^7(c+d x)}{7 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 373
Rule 3675
Rubi steps
\begin {align*} \int \text {sech}^4(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \left (1-x^2\right ) \left (a+b x^2\right )^2 \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\operatorname {Subst}\left (\int \left (a^2-a (a-2 b) x^2-(2 a-b) b x^4-b^2 x^6\right ) \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {a^2 \tanh (c+d x)}{d}-\frac {a (a-2 b) \tanh ^3(c+d x)}{3 d}-\frac {(2 a-b) b \tanh ^5(c+d x)}{5 d}-\frac {b^2 \tanh ^7(c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.58, size = 83, normalized size = 1.09 \[ \frac {\tanh (c+d x) \left (\left (35 a^2+14 a b+3 b^2\right ) \text {sech}^2(c+d x)+70 a^2-6 b (7 a+4 b) \text {sech}^4(c+d x)+28 a b+15 b^2 \text {sech}^6(c+d x)+6 b^2\right )}{105 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.40, size = 677, normalized size = 8.91 \[ -\frac {8 \, {\left (2 \, {\left (35 \, a^{2} + 56 \, a b + 27 \, b^{2}\right )} \cosh \left (d x + c\right )^{5} + 10 \, {\left (35 \, a^{2} + 56 \, a b + 27 \, b^{2}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + {\left (35 \, a^{2} + 98 \, a b + 51 \, b^{2}\right )} \sinh \left (d x + c\right )^{5} + 14 \, {\left (25 \, a^{2} + 16 \, a b - 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} + {\left (10 \, {\left (35 \, a^{2} + 98 \, a b + 51 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 105 \, a^{2} + 126 \, a b - 63 \, b^{2}\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (10 \, {\left (35 \, a^{2} + 56 \, a b + 27 \, b^{2}\right )} \cosh \left (d x + c\right )^{3} + 21 \, {\left (25 \, a^{2} + 16 \, a b - 3 \, b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + 28 \, {\left (25 \, a^{2} + 4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right ) + {\left (5 \, {\left (35 \, a^{2} + 98 \, a b + 51 \, b^{2}\right )} \cosh \left (d x + c\right )^{4} + 63 \, {\left (5 \, a^{2} + 6 \, a b - 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 70 \, a^{2} + 28 \, a b + 126 \, b^{2}\right )} \sinh \left (d x + c\right )\right )}}{105 \, {\left (d \cosh \left (d x + c\right )^{9} + 9 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{8} + d \sinh \left (d x + c\right )^{9} + 7 \, d \cosh \left (d x + c\right )^{7} + {\left (36 \, d \cosh \left (d x + c\right )^{2} + 7 \, d\right )} \sinh \left (d x + c\right )^{7} + 7 \, {\left (12 \, d \cosh \left (d x + c\right )^{3} + 7 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{6} + 22 \, d \cosh \left (d x + c\right )^{5} + {\left (126 \, d \cosh \left (d x + c\right )^{4} + 147 \, d \cosh \left (d x + c\right )^{2} + 20 \, d\right )} \sinh \left (d x + c\right )^{5} + {\left (126 \, d \cosh \left (d x + c\right )^{5} + 245 \, d \cosh \left (d x + c\right )^{3} + 110 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{4} + 42 \, d \cosh \left (d x + c\right )^{3} + {\left (84 \, d \cosh \left (d x + c\right )^{6} + 245 \, d \cosh \left (d x + c\right )^{4} + 200 \, d \cosh \left (d x + c\right )^{2} + 28 \, d\right )} \sinh \left (d x + c\right )^{3} + {\left (36 \, d \cosh \left (d x + c\right )^{7} + 147 \, d \cosh \left (d x + c\right )^{5} + 220 \, d \cosh \left (d x + c\right )^{3} + 126 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + 56 \, d \cosh \left (d x + c\right ) + {\left (9 \, d \cosh \left (d x + c\right )^{8} + 49 \, d \cosh \left (d x + c\right )^{6} + 100 \, d \cosh \left (d x + c\right )^{4} + 84 \, d \cosh \left (d x + c\right )^{2} + 14 \, d\right )} \sinh \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.24, size = 238, normalized size = 3.13 \[ -\frac {4 \, {\left (105 \, a^{2} e^{\left (10 \, d x + 10 \, c\right )} + 210 \, a b e^{\left (10 \, d x + 10 \, c\right )} + 105 \, b^{2} e^{\left (10 \, d x + 10 \, c\right )} + 455 \, a^{2} e^{\left (8 \, d x + 8 \, c\right )} + 350 \, a b e^{\left (8 \, d x + 8 \, c\right )} - 105 \, b^{2} e^{\left (8 \, d x + 8 \, c\right )} + 770 \, a^{2} e^{\left (6 \, d x + 6 \, c\right )} + 140 \, a b e^{\left (6 \, d x + 6 \, c\right )} + 210 \, b^{2} e^{\left (6 \, d x + 6 \, c\right )} + 630 \, a^{2} e^{\left (4 \, d x + 4 \, c\right )} + 84 \, a b e^{\left (4 \, d x + 4 \, c\right )} - 42 \, b^{2} e^{\left (4 \, d x + 4 \, c\right )} + 245 \, a^{2} e^{\left (2 \, d x + 2 \, c\right )} + 98 \, a b e^{\left (2 \, d x + 2 \, c\right )} + 21 \, b^{2} e^{\left (2 \, d x + 2 \, c\right )} + 35 \, a^{2} + 14 \, a b + 3 \, b^{2}\right )}}{105 \, d {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{7}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.47, size = 158, normalized size = 2.08 \[ \frac {a^{2} \left (\frac {2}{3}+\frac {\mathrm {sech}\left (d x +c \right )^{2}}{3}\right ) \tanh \left (d x +c \right )+2 a b \left (-\frac {\sinh \left (d x +c \right )}{4 \cosh \left (d x +c \right )^{5}}+\frac {\left (\frac {8}{15}+\frac {\mathrm {sech}\left (d x +c \right )^{4}}{5}+\frac {4 \mathrm {sech}\left (d x +c \right )^{2}}{15}\right ) \tanh \left (d x +c \right )}{4}\right )+b^{2} \left (-\frac {\sinh ^{3}\left (d x +c \right )}{4 \cosh \left (d x +c \right )^{7}}-\frac {\sinh \left (d x +c \right )}{8 \cosh \left (d x +c \right )^{7}}+\frac {\left (\frac {16}{35}+\frac {\mathrm {sech}\left (d x +c \right )^{6}}{7}+\frac {6 \mathrm {sech}\left (d x +c \right )^{4}}{35}+\frac {8 \mathrm {sech}\left (d x +c \right )^{2}}{35}\right ) \tanh \left (d x +c \right )}{8}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.34, size = 928, normalized size = 12.21 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.22, size = 732, normalized size = 9.63 \[ -\frac {\frac {4\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{35\,d}+\frac {32\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a^2-b^2\right )}{35\,d}+\frac {4\,{\mathrm {e}}^{4\,c+4\,d\,x}\,{\left (a+b\right )}^2}{7\,d}}{4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1}-\frac {\frac {32\,\left (a^2-b^2\right )}{105\,d}+\frac {8\,{\mathrm {e}}^{2\,c+2\,d\,x}\,{\left (a+b\right )}^2}{21\,d}}{3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1}-\frac {\frac {32\,\left (a^2-b^2\right )}{105\,d}+\frac {64\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (a^2-b^2\right )}{35\,d}+\frac {16\,{\mathrm {e}}^{6\,c+6\,d\,x}\,{\left (a+b\right )}^2}{21\,d}+\frac {16\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{35\,d}}{5\,{\mathrm {e}}^{2\,c+2\,d\,x}+10\,{\mathrm {e}}^{4\,c+4\,d\,x}+10\,{\mathrm {e}}^{6\,c+6\,d\,x}+5\,{\mathrm {e}}^{8\,c+8\,d\,x}+{\mathrm {e}}^{10\,c+10\,d\,x}+1}-\frac {\frac {32\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (a^2-b^2\right )}{7\,d}+\frac {32\,{\mathrm {e}}^{8\,c+8\,d\,x}\,\left (a^2-b^2\right )}{7\,d}+\frac {8\,{\mathrm {e}}^{2\,c+2\,d\,x}\,{\left (a+b\right )}^2}{7\,d}+\frac {8\,{\mathrm {e}}^{10\,c+10\,d\,x}\,{\left (a+b\right )}^2}{7\,d}+\frac {16\,{\mathrm {e}}^{6\,c+6\,d\,x}\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{7\,d}}{7\,{\mathrm {e}}^{2\,c+2\,d\,x}+21\,{\mathrm {e}}^{4\,c+4\,d\,x}+35\,{\mathrm {e}}^{6\,c+6\,d\,x}+35\,{\mathrm {e}}^{8\,c+8\,d\,x}+21\,{\mathrm {e}}^{10\,c+10\,d\,x}+7\,{\mathrm {e}}^{12\,c+12\,d\,x}+{\mathrm {e}}^{14\,c+14\,d\,x}+1}-\frac {\frac {4\,{\left (a+b\right )}^2}{21\,d}+\frac {32\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a^2-b^2\right )}{21\,d}+\frac {64\,{\mathrm {e}}^{6\,c+6\,d\,x}\,\left (a^2-b^2\right )}{21\,d}+\frac {20\,{\mathrm {e}}^{8\,c+8\,d\,x}\,{\left (a+b\right )}^2}{21\,d}+\frac {8\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (3\,a^2-2\,a\,b+3\,b^2\right )}{7\,d}}{6\,{\mathrm {e}}^{2\,c+2\,d\,x}+15\,{\mathrm {e}}^{4\,c+4\,d\,x}+20\,{\mathrm {e}}^{6\,c+6\,d\,x}+15\,{\mathrm {e}}^{8\,c+8\,d\,x}+6\,{\mathrm {e}}^{10\,c+10\,d\,x}+{\mathrm {e}}^{12\,c+12\,d\,x}+1}-\frac {4\,{\left (a+b\right )}^2}{21\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \operatorname {sech}^{4}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________